/*
============================================================================
Name        : eStockAppUi.h
Author      : 
Version     :
Copyright   : 
Description : Main application UI class (controller)
============================================================================
*/

#ifndef __ESTOCKAPPUI_H__
#define __ESTOCKAPPUI_H__

// INCLUDES
#include <aknviewappui.h> 
#include "Global.h"
#ifdef __SERIES60_3X__
#include "IMEIReader.h"
#else
#include <plpvariant.h> // for obtaining IMEI codes 
#endif

// FORWARD DECLARATIONS
class CeStockMainGridContainer;
class CeStockContainer;
//class CBlock;
class CGlobal;
class CBaseCommon;
class CBlockMenu;
class CGprsTools;
class CBaseView;

class CeStockAppUi : public CAknViewAppUi
#ifdef  __SERIES60_3X__
	,MIMEIObserver
#endif
{
public: // Constructors and destructor

	void ConstructL();

	CeStockAppUi(CGprsTools* aGprsTool);

	virtual ~CeStockAppUi();

public:  // Functions from base classes

	void HandleCommandL( TInt aCommand );

	void HandleStatusPaneSizeChange();

#ifdef __SERIES60_3X__
	void HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination);

	//from MIMEIObserver
	void GotIMEIL(const TDesC& aIMEI,TInt aError);
#endif
	
public:
	//new functions
    void SwitchView(TUid aViewId);    
    CBaseView* GetView(TUid aViewId) const;
    CBaseView* GetCurView() const; 

private:
	//new functions
	void SaveGoodsName(const TDesC& aFileName, const RArray<TGoodsName>& aArray);
	void LoadGoodsName(const TDesC& aFileName, RArray<TGoodsName>& aArray);

	void SaveSetting();
	void LoadSetting();
	
	void SaveTradeServer();
	void SaveGroupServer();
	
	void LoadGroupServer();
	void LoadTradeServer();

public:
	CBaseCommon* m_BaseCommon;
	CGlobal*	m_Globe;
	CGprsTools* g_GprsTool;

#ifdef  __SERIES60_3X__
	CIMEIReader* m_imeiReader;
#endif
};

#endif // __ESTOCKAPPUI_H__

// End of File
